<?php

namespace src\baseModels;

use Yii;

/**
 * This is the model class for table "{{%invitations}}".
 *
 * @property integer $id
 * @property integer $member_id
 * @property integer $channel
 * @property string $return_at
 * @property string $created_at
 * @property string $updated_at
 *
 * @property Members $member
 */
class Invitations extends \common\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%invitations}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['member_id', 'channel'], 'integer'],
            [['return_at', 'created_at', 'updated_at'], 'string', 'max' => 255]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'member_id' => 'Member ID',
            'channel' => 'Channel',
            'return_at' => 'Return At',
            'created_at' => 'Created At',
            'updated_at' => 'Updated At',
        ];
    }

    /**
     * @return \yii\db\ActiveQuery
     */
    public function getMember()
    {
        return Members::findOne($this->member_id);
    }
}
